<html>
<head><meta charset="utf-8"><title>assist to expand star import · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html">assist to expand star import</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205244597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205244597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205244597">(Jul 28 2020 at 14:45)</a>:</h4>
<p>Is there any assist to convert form an star import (use crate::*) to specific items? IIRC it was implemented in RLS and it was great to work quickly and later remove the star uses.</p>



<a name="205244664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205244664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205244664">(Jul 28 2020 at 14:45)</a>:</h4>
<p>Not yet I believe</p>



<a name="205244767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205244767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205244767">(Jul 28 2020 at 14:46)</a>:</h4>
<p>I changed to topic name from "(no topic)". Hope you don't mind.</p>



<a name="205244897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205244897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205244897">(Jul 28 2020 at 14:47)</a>:</h4>
<p>Oh, much better like that. I skimmed through the topics and couldn't figure out what to use...</p>



<a name="205244987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205244987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205244987">(Jul 28 2020 at 14:48)</a>:</h4>
<p>Should I file a bug?</p>



<a name="205245038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245038">(Jul 28 2020 at 14:48)</a>:</h4>
<p>I couldn't find one at <a href="https://github.com/rust-analyzer/rust-analyzer/issues">https://github.com/rust-analyzer/rust-analyzer/issues</a></p>



<a name="205245084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245084">(Jul 28 2020 at 14:49)</a>:</h4>
<p>Sure</p>



<a name="205245513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245513">(Jul 28 2020 at 14:52)</a>:</h4>
<p>Done! <a href="https://github.com/rust-analyzer/rust-analyzer/issues/5557">https://github.com/rust-analyzer/rust-analyzer/issues/5557</a></p>



<a name="205245638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245638">(Jul 28 2020 at 14:53)</a>:</h4>
<p>Can you include "glob" in the issue title for SEO purposes?</p>



<a name="205245803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245803">(Jul 28 2020 at 14:54)</a>:</h4>
<p>Indeed!</p>



<a name="205245884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205245884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205245884">(Jul 28 2020 at 14:55)</a>:</h4>
<p>I've kept glob import (star import)</p>



<a name="205249224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205249224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205249224">(Jul 28 2020 at 15:18)</a>:</h4>
<p>There's a clippy lint that can do that <a href="https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports">https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports</a></p>



<a name="205253042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/assist%20to%20expand%20star%20import/near/205253042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pachi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/assist.20to.20expand.20star.20import.html#205253042">(Jul 28 2020 at 15:46)</a>:</h4>
<p><span class="user-mention" data-user-id="217864">@matthiaskrgr</span>  Yes, the lint exists and warns about these imports. But, this is a request for an assist that can expand the glob with the items that are actually used  in the module.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>